using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

namespace ForumExplorer.Extension.Tagging
{
    public partial class Login : Form
    {
        public Login()
        {
            InitializeComponent();
            this.Focus();
        }

        public string username()
        {
            return textBoxUserName.Text;
        }

        public string password()
        {
            return textBoxPassword.Text;
        }

        private void linkLabel1_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
        {
            NewAccount accountForm = new NewAccount();
            accountForm.Show();
        }

		/// <revisionHistory>
		/// <revision author="Peter Ritchie" date="22-Oct-06">
		/// Created
		/// </revision>
		/// </revisionHistory>
		private void Login_FormClosing ( object sender, FormClosingEventArgs e )
		{
			// save the user's settings
			global::ForumExplorer.Extension.Delicious.Properties.Settings.Default.Save();
		}

		/// <revisionHistory>
		/// <revision author="Peter Ritchie" date="22-Oct-06">
		/// Created
		/// </revision>
		/// </revisionHistory>
		private void Login_Load ( object sender, EventArgs e )
		{
			if (!String.IsNullOrEmpty(textBoxUserName.Text))
			{
				// stick and event on the end of the queue
				// to set the focus of the password text box.
				this.BeginInvoke((MethodInvoker)delegate
				{
					textBoxPassword.Focus();
				});
			}
		}
    }
}